#!/usr/bin/python3

import os
from  baseSql import *
import logging.handlers

from dbPool import *

class CProductTypeMgr:
    tableTitle = "产品类型"
    def __init__(self, log):
        self.log = log
        self.productType = [self.tableTitle]

    def init(self, db):
        self.db = db
        self.reload()


    def reload(self):
        self.productType = [self.tableTitle]
        self.db.query(queryAllTableSql + t_product_type)
        datas = self.db.getData()
        for data in datas:
            self.productType.append(data[0])

